<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex redemptDetails_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between redemptDetails_fd0_0'>
          <view class='flex flex-wrap align-center redemptDetails_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  redemptDetails_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-center'>
            <text class='redemptDetails_fd0_0_c1_c0'>订单详情</text>
          </view>
          <view class='flex align-center justify-end redemptDetails_fd0_0_c2'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---订单flex布局开始-->
      <view class="flex flex-direction align-stretch benben-flex-layout redemptDetails_flex_1">
        <view class='flex align-center justify-between redemptDetails_fd1_0'>
          <view class='flex flex-direction align-stretch redemptDetails_fd1_0_c0'>
            <text class='redemptDetails_fd1_0_c0_c0'>{{dataDetails.check_status ==0 ? '待确认' :
              dataDetails.check_status  ==1 ? '已确认' :
              dataDetails.check_status  ==2 ? '已驳回' : ''

              }}</text>
            <!-- <text class='redemptDetails_fd1_0_c0_c1' v-if="dataDetails.user_id_2">指定派单</text> -->
          </view>
          <image class='redemptDetails_fd1_0_c1_1' v-if="dataDetails.check_status=='0'" mode="aspectFit"
            :src='STATIC_URL+"41.png"'></image>
          <image class='redemptDetails_fd1_0_c1_1' mode="aspectFit" :src='STATIC_URL+"42.png"'
            v-if="dataDetails.check_status=='1'"></image>
          <image class='redemptDetails_fd1_0_c1_1' mode="aspectFit" :src='STATIC_URL+"43.png"'
            v-if="dataDetails.check_status=='2'"></image>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch redemptDetails_fd1_1'>
          <view class='flex flex-wrap align-center justify-end ' style="margin:32rpx 0 0 0" v-if="type==2">
            <text class='redemptDetails_fd1_1_c0_c0'>转运点</text>
            <text class='redemptDetails_fd1_1_c1_c1'>{{dataDetails.xitongbumen1_name}}</text>
          </view>
          <!-- <view class=' flex flex-wrap align-center justify-end redemptDetails_fd1_1_c1'
            style="margin: 32rpx 0rpx 32rpx 0rpx;">
            <text class='redemptDetails_fd1_1_c0_c0'>型号</text>
            <text class='redemptDetails_fd1_1_c1_c1'>{{dataDetails.cate}}</text>
          </view> -->

          <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_1_c1' style="margin:32rpx 0 32rpx 0">
            <text class='redemptDetails_fd1_1_c0_c0'>数量</text>
            <text class='redemptDetails_fd1_1_c1_c1'>{{dataDetails.num}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_1_c1' v-if="type==2">
            <text class='redemptDetails_fd1_1_c0_c0'>提交时间</text>
            <text class='redemptDetails_fd1_1_c1_c1'>{{dataDetails.create_time}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_1_c1' v-if="type==0">
            <text class='redemptDetails_fd1_1_c0_c0'>转入时间</text>
            <text class='redemptDetails_fd1_1_c1_c1'>{{dataDetails.create_time}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_1_c1' v-if="type==0">
            <text class='redemptDetails_fd1_1_c0_c0'>转入点</text>
            <text class='redemptDetails_fd1_1_c1_c1'>{{dataDetails.xitongbumen_name}}</text>
          </view>
          <view class='flex  align-center justify-end redemptDetails_fd1_1_c1'>
            <text class='redemptDetails_fd1_1_c0_c0'>图片</text>
            <!-- <text class='redemptDetails_fd1_1_c5_c1'>{{dataDetails.wenjianshangchuan}}</text> -->
          </view>
          <view class="flex  align-center flex-wrap">
            <image class="imgs" v-for="(item,index) in wenjianshangchuan"
              @click.stop="prevImage(wenjianshangchuan,index)" :key="index" :src="item" mode="aspectFill">
            </image>
          </view>
          <view class='flex  align-center justify-end redemptDetails_fd1_1_c1'>
            <text class='redemptDetails_fd1_1_c0_c0'>备注</text>
            <text class='redemptDetails_fd1_1_c5_c1'>{{dataDetails.remark}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_1_c1' v-if="type==2">
            <text class='redemptDetails_fd1_1_c0_c0'>完成时间</text>
            <text class='redemptDetails_fd1_1_c1_c1'>{{dataDetails.update_time}}</text>
          </view>
        </view>
        <view class='flex flex-wrap align-center justify-end redemptDetails_fd1_3' v-if="type==0">
          <view class="" v-if="dataDetails.check_status==1">
            确认时间：{{dataDetails.update_time}}
          </view>
          <!-- <button class='redemptDetails_fd1_3_c1' v-if="dataDetails.order_status=='1'"
            @click="callMobile(dataDetails.user_info.mobile)">联系客户</button> -->
          <button class='redemptDetails_fd1_3_c0' v-if="dataDetails.check_status==0" @click="jiedan('1')">确认接受</button>
          <button class='redemptDetails_fd1_3_c1' v-if="dataDetails.check_status==0" @click="jiedan('2')">驳回</button>
          <button class='redemptDetails_fd1_3_c0' v-if="dataDetails.check_status==2" @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/tabBar/orderList/Outboundtransfer?aid=${aid}`">重新提交</button>

        </view>

      </view>

      <!---订单flex布局结束-->
      <benben-popup v-model="popupShow1706076633241" :mask="true" :mask-close-able="false" mode='center'>
        <!---删除弹窗flex布局开始-->
        <view class="flex flex-direction flex-wrap align-center redemptDetails_flex_2">
          <text class='redemptDetails_fd2_0'>提示</text>
          <text class='redemptDetails_fd2_1'>确定开始接单</text>
          <view class='flex flex-wrap align-center redemptDetails_fd2_2'>
            <button class='redemptDetails_fd2_2_c0' @click.stop="popupShow1706076633241=false">取消</button>
            <!-- <button class='redemptDetails_fd2_2_c1' @click.stop="jiedan">确认</button> -->
          </view>
        </view>

        <!---删除弹窗flex布局结束-->

      </benben-popup>


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
        "aid": "",
        popupShow1706076633241: false,
        dataDetails: '',
        fd1_4_c3: '',
        remark: '',
        shifu_num: '',
        type: '',
        wenjianshangchuan: []
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      let {
        aid,
        type
      } = options
      if (aid !== undefined) this.aid = aid
      if (type !== undefined) this.type = type

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.getDetailFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      prevImage(urls, index) {
        console.log('pppp', urls)
        uni.previewImage({
          urls: urls,
          current: index
        })
      },
      jiedan(type) {
        this.$api.post(global.apiUrls.post66ea6d31afb58, {
          aid: this.aid,
          check: type
        }).then(res => {
          this.popupShow1706076633241 = false
          if (res.data.code == 1) {
            this.getDetailFunc()
          } else {
            this.$message.info(res.data.msg)
          }
        })
      },
      //订单-订单详情
      async getDetailFunc() {
        //请求方法
        //数据验证
        this.$api.post(global.apiUrls.post66ea839d775bc, {
          aid: this.aid
        }).then(res => {
          if (res.data.code == 1) {
            this.dataDetails = res.data.data
            this.wenjianshangchuan = this.dataDetails.wenjianshangchuan.split(',')
          }
        })

      },
    }
  };
</script>
<style lang="scss" scoped>
  .imgs {
    width: 120rpx;
    height: 120rpx;
    border-radius: 16rpx;
    margin-bottom: 32rpx;
    margin-right: 24rpx;
  }

  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: url(image-path('4.png')) no-repeat;
    background-size: 100% auto;
  }

  .redemptDetails_flex_0 {
    background: url(image-path('4.png')) no-repeat;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .redemptDetails_fd0_0_c2 {
    padding: 0rpx 0rpx 0rpx 0rpx;
    width: 200rpx;
  }

  .redemptDetails_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 600;
    color: #fff;
  }

  .redemptDetails_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #fff;
    font-weight: 500;
  }

  .redemptDetails_fd0_0_c0 {
    width: 200rpx;
  }

  .redemptDetails_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .redemptDetails_flex_1 {
    padding: 5rpx 24rpx 32rpx 24rpx;
    margin: 0rpx 0rpx 88rpx 0rpx;
  }

  .redemptDetails_numberfd1_4_c3_c0 {
    width: 100%;
    font-size: 24rpx;
    color: var(--benbenFontColor0);
    line-height: 46rpx;
    font-weight: 400;
  }

  .redemptDetails_input_fd1_4_c3 {
    width: 100%;
    height: 140rpx;
    font-size: 28rpx;
    font-weight: 400;
    color: #333;
    white-space: pre-wrap;
  }

  .redemptDetails_fd1_4_c3 {
    background: #F8F9FD;
    width: 638rpx;
    border-radius: 10rpx 10rpx 10rpx 10rpx;
    padding: 10rpx 10rpx 0rpx 16rpx;
    margin: 12rpx auto 0rpx auto;
    height: 240rpx;
  }

  .redemptDetails_fd1_4_c2_c0_c0 {
    margin: 0rpx 72rpx 0rpx 0rpx;
    font-size: 28rpx;
    font-weight: 400;
    color: var(--benbenFontColor0);
  }

  .redemptDetails_fd1_4_c1_c1_c1 {
    margin: -6rpx 0rpx 0rpx 12rpx;
  }

  .redemptDetails_fd1_4_c1_c1_c0 {
    font-size: 28rpx;
    text-align: right;
  }

  .redemptDetails_fd1_4_c1_c0 {
    font-size: 28rpx;
    font-weight: 400;
    color: var(--benbenFontColor0);
  }

  .redemptDetails_fd1_4_c1 {
    line-height: 34rpx;
    margin: 32rpx 0rpx 0rpx 0rpx;
    font-size: 28rpx;
  }

  .redemptDetails_fd1_4 {
    background: #fff;
    background-size: 100% auto !important;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 32rpx 24rpx 32rpx 24rpx;
    margin: 0rpx 0rpx 100rpx 0rpx;
  }

  .redemptDetails_fd1_3_c1 {
    background: #c72121;
    border-radius: 40rpx 40rpx 40rpx 40rpx;
    font-size: 24rpx;
    color: #FFF;
    width: 184rpx;
    height: 64rpx;
    line-height: 64rpx;
    font-weight: 400;
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .redemptDetails_fd1_3_c0_1 {
    background: var(--benbenbgColor7);
    border-radius: 40rpx 40rpx 40rpx 40rpx;
    font-size: 24rpx;
    color: #fff;
    width: 170rpx;
    height: 60rpx;
    line-height: 60rpx;
    font-weight: 400;
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .redemptDetails_fd1_3_c0 {
    background: rgba(16, 51, 126, 1);
    border-radius: 40rpx 40rpx 40rpx 40rpx;
    font-size: 24rpx;
    color: #fff;
    width: 170rpx;
    height: 60rpx;
    line-height: 60rpx;
    font-weight: 400;
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .redemptDetails_fd1_3 {
    background: #FFF;
    background-size: 100% auto !important;
    position: fixed;
    bottom: calc(0rpx + var(--window-bottom));
    width: 750rpx;
    height: 88rpx;
    left: 0rpx;
    padding: 0rpx 24rpx 0rpx 24rpx;
    z-index: 9;
  }

  .redemptDetails_fd1_2_c2_c0_c1 {
    font-size: 24rpx;
    font-weight: 400;
    color: #333333;
  }

  .redemptDetails_fd1_2_c2_c0_c0 {
    margin: 0rpx 72rpx 0rpx 0rpx;
    font-size: 28rpx;
    font-weight: 400;
    color: #999999;
  }

  .redemptDetails_fd1_2_c2_c0 {
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_fd1_2_c1_c1_c1 {
    border: 1px solid #10337E;
    background: #FFFFFF;
    font-size: 22rpx;
    font-weight: 400;
    color: var(--benbenFontColor4);
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 1rpx 6rpx 1rpx 6rpx;
    margin-left: 30rpx;
  }

  .redemptDetails_fd1_2_c1_c1_c0 {
    font-size: 24rpx;
    font-weight: 400;
    color: #333333;
    margin: 0rpx 0 0rpx 72rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .redemptDetails_fd1_2_c1_c0 {
    font-size: 28rpx;
    font-weight: 400;
    color: #999999;
  }

  .redemptDetails_fd1_2_c1 {
    line-height: 34rpx;
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_fd1_2_c0_c1 {
    font-size: 32rpx;
    font-weight: 500;
    color: #333333;
  }

  .redemptDetails_fd1_2_c0_c0 {
    background: rgba(16, 51, 126, 1);
    width: 6rpx;
    height: 30rpx;
    margin: 0rpx 15rpx 0rpx 0rpx;
    transform: scaleX(0.5);
  }

  .redemptDetails_fd1_2_c0 {
    border-bottom: 1px solid #eee;
    padding: 0rpx 0rpx 24rpx 0rpx;
    margin: 0rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_fd1_2 {
    background: #fff;
    background-size: 100% auto !important;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 32rpx 24rpx 32rpx 24rpx;
    margin: 12rpx 0rpx 24rpx 0rpx;
  }

  .redemptDetails_fd1_1_c5_c1 {
    font-size: 28rpx;
    color: #333333;
    line-height: 42rpx;
    text-align: right;
  }

  .redemptDetails_fd1_1_c2_c1_1 {
    font-size: 28rpx;
    font-weight: 700;
    color: #333333;
    line-height: 42rpx;
  }

  .redemptDetails_fd1_1_c1_c1 {
    font-size: 28rpx;
    color: #333333;
    line-height: 42rpx;
  }

  .redemptDetails_fd1_1_c1 {
    margin: 0rpx 0rpx 32rpx 0rpx;
  }

  .redemptDetails_fd1_1_c0_c0 {
    font-size: 28rpx;
    font-weight: 500;
    color: #333333;
    margin: 0rpx auto 0rpx 0rpx;
  }

  .redemptDetails_fd1_1_c0 {
    margin: 32rpx 0rpx 32rpx 0rpx;
  }

  .redemptDetails_fd1_1 {
    background: #fff;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    background-size: 100% auto !important;
    margin: 12rpx 0rpx 12rpx 0rpx;
    padding: 0rpx 24rpx 0rpx 24rpx;
  }

  .redemptDetails_fd1_0_c1_1 {
    width: 140rpx;
    height: 140rpx;
  }

  .redemptDetails_fd1_0_c1 {
    width: 80rpx;
    height: 80rpx;
  }

  .redemptDetails_fd1_0_c0_c1 {
    font-size: 24rpx;
    margin: 12rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_fd1_0_c0_c0 {
    font-size: 32rpx;
    font-weight: 600;
  }

  .redemptDetails_fd1_0_c0 {
    color: var(--benbenFontColor3);
  }

  .redemptDetails_fd1_0 {
    padding: 12rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_flex_2 {
    background: #fff;
    width: 540rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .redemptDetails_fd2_2_c1 {
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 16rpx 0rpx;
    font-size: 32rpx;
    color: rgba(16, 51, 126, 1);
    font-weight: 500;
    width: 270rpx;
  }

  .redemptDetails_fd2_2_c0 {
    border-top: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 0rpx 16rpx;
    font-size: 32rpx;
    color: rgba(153, 153, 153, 1);
    font-weight: 500;
    width: 270rpx;
  }

  .redemptDetails_fd2_2 {
    margin: 37rpx 0rpx 0rpx 0rpx;
  }

  .redemptDetails_fd2_1 {
    line-height: 52rpx;
    font-size: 32rpx;
    font-weight: 400;
    color: #333333;
    margin: 0rpx 32rpx 0rpx 32rpx;
    text-align: center;
  }

  .redemptDetails_fd2_0 {
    font-size: 36rpx;
    font-weight: 700;
    line-height: 32rpx;
    color: #333333;
    margin: 40rpx 0rpx 40rpx 0rpx;
  }
</style>
